/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vue;

import ia_multiagent1.Agent;
import ia_multiagent1.Espace2D;
import java.util.Vector;
import javax.swing.JFrame;

/**
 *
 * @author Harakan
 */
public class Notice8JFrame extends JFrame{
    
    private int hauteurFenetre;
    private int largeurFenetre;
    private int dimGridCases;
    private int dimPixelCase = 15;
    private JPanelGrid maGrille;
    
    
    public Notice8JFrame(int dimGridCases, Vector<Agent> mesAgents, Espace2D espace2d,boolean valeurChamps, boolean suiviAgent){
    this.dimGridCases =  dimGridCases;
        
       int tailleGrille = (this.dimGridCases*(dimPixelCase+1)+1);
       hauteurFenetre = tailleGrille+20;
       largeurFenetre = tailleGrille+20;
       
       this.setSize(largeurFenetre,hauteurFenetre);
       this.setLocationRelativeTo(null);     
       
       
       
        maGrille = new JPanelGrid(dimGridCases, dimPixelCase, mesAgents, espace2d,false,false); 
        maGrille.setOnlyValeurChamps(valeurChamps); 
        maGrille.setSuiviAgent(suiviAgent);
        this.getContentPane().add(maGrille);
        this.setTitle("Notice 8 : valeur d'attraction de chaque case");
        this.setVisible(true);
        
                
    }
    
    
    public void repaintGrille() {
        maGrille.repaint();        
    }
    
}
